//
//  ZYFDataConversionTool.h
//  VPOS3695Demo
//
//  Created by 张玉风 on 2018/7/9.
//  Copyright © 2018年 张玉风. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ZYFDataConversionTool : NSObject

///将传入的字典转换为固定格式的16进制字符串
+(NSString*)hexadecimalToDictionary:(NSDictionary *)dict;

///将传入的十六进制转换为字典字符串
+(NSString*)dicStringTohexadecimal:(NSString *)str;

/// 字典转json字符串方法
+(NSString *)convertToJsonData:(NSDictionary *)dict;

/// json转字典
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

/// 16进制转NSData
+ (NSData *)convertHexStrToData:(NSString *)str;

/// 普通字符串转换为十六进制的。
+ (NSString *)hexStringFromString:(NSString *)string;

///字符串转NSDATA
+(NSData *)hexString:(NSString *)hexString;

/// NSData转16进制
+ (NSString *)convertDataToHexStr:(NSData *)data;

/// 16进制字符串转成普通字符串
+ (NSString *)stringFromHexString:(NSString *)hexString;

///10进制转16进制+5 字符串 不满8位前面填充0
+ (NSString *)getHexByDecimalAdd5:(NSInteger)decimal;

///10进制转16进制字符串 不满8位前面填充0
+ (NSString *)getHexByDecimal:(NSInteger)decimal;

// 16进制data转字典
+ (NSDictionary *)dataByDict:(NSData *)data;

//
+ (NSData *)strForData:(NSString *)str;

+ (NSString *)getFiftyFiveZoon:(NSString *)dataStr;
+ (NSString *)getAid:(NSString *)dataStr;
+ (NSString *)offlineDealMessage:(NSString *)dataStr;

@end
